/*
 * Encoder.h
 *
 *  Created on: Dec 10, 2011
 *      Author: andrea
 */

#ifndef ENCODER_H_
#define ENCODER_H_

#include <boost/unordered_map.hpp>
#include <algorithm>
#include <string>
#include <vector>
#include <set>
#include "../../Util/Util.h"
#include "IntervalSelector.h"
#include "../../Packets/PubPkt.h"
#include "../../Packets/BackSubPkt.h"
#include <iostream>

class Encoder {

public:

	Encoder(int parNumClusters);

	virtual ~Encoder();

	void clear();

	void addEntry(int type, boost::unordered_map<std::string, std::vector<Type> >);

	std::string encode(PubPkt *pkt);

	std::set<std::string> encode(BackSubPkt *pkt);


private:

	boost::unordered_map<int, boost::unordered_map<std::string, IntervalSelector > > attributeMap;
	int numClusters;

};

#endif /* ENCODER_H_ */
